package com.grechur.wanandroidcompose.widget

import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.sp

@Composable
fun UserMutilText(title: String, content: String, modifier: Modifier = Modifier) {
    Text(text = buildAnnotatedString {
        withStyle(
            style = SpanStyle(
                color = Color.Black,
                fontSize = 16.sp
            )
        ) {
            append(title)
        }

        withStyle(
            style = SpanStyle(
                color = Color.Blue,
                fontSize = 14.sp
            )
        ) {
            append(content)
        }
    }, modifier = modifier)
}